package com.yang.mall.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yang.mall.dto.BannerDTO;
import com.yang.mall.entity.Banner;
import com.yang.mall.entity.QueryRequest;

import java.util.List;

/**
 * <p>
 * 广告表 服务类
 * </p>
 *
 * @author kadorlin
 * @since 2022-10-21
 */
public interface IBannerService extends IService<Banner> {


    /**
     * saveBatch
     * @Date 2021/11/22
     * @Author Cyj
     * @param banner
     * @return void
     */
    void add(Banner banner);

    /**
     * 按广告 DTO 获取列表
     * @Date 2021/11/22
     * @Author Cyj
     * @param bannerDTO
     * @return java.util.List<run.olive.common.core.entity.live.entity.Banner>
     */
    List<Banner> getListByBannerDTO(BannerDTO bannerDTO);

    /**
     * 通过广告 DTO 获取正在显示的广告
     * @Date 2021/12/1
     * @Author Cyj
     * @param bannerDTO
     * @return java.util.List<run.olive.common.core.entity.live.entity.Banner>
     */
    List<Banner> getDisplayedByBannerDTO(BannerDTO bannerDTO);

    /**
     * getPageByBannerDTO
     * @Date 2021/11/22
     * @Author Cyj
     * @param request
     * @param bannerDTO
     * @return com.baomidou.mybatisplus.core.metadata.IPage<run.olive.common.core.entity.live.entity.Banner>
     */
    IPage<Banner> getPageByBannerDTO(QueryRequest request, BannerDTO bannerDTO);

    /**
     * update
     * @Date 2021/11/22
     * @Author Cyj
     * @param banner
     * @return void
     */
    void update(Banner banner);

    /**
     * delete
     * @Date 2021/11/22
     * @Author Cyj
     * @param ids
     * @return void
     */
    void delete(List<Long> ids);
}
